package cn;

import jdk.jfr.Description;
import org.junit.Test;
import org.junit.jupiter.api.DisplayName;

import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

/**
 * description:
 * author:zcx
 * lenovo
 * 时间：2022.02.17.10.31
 */
public class d1 {
    @Test
    @DisplayName("连接数据库")
    public void m1() throws SQLException, ClassNotFoundException {
        Class.forName("com.mysql.cj.jdbc.Driver");
        var c= DriverManager.getConnection("jdbc:mysql://localhost:3305/t?user=zcx&password=123");
        System.out.println(c);
    }
}
